package com.wangshouyu.mp.offiaccount.message;

import com.wangshouyu.mp.message.TextMessage;

import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月07日 13:41
 * @description 客服文本消息
 */
public class KfTextMessage extends BaseKfMessage{

    /**
     * 文本消息
     */
    private TextMessage text;

    public TextMessage getText() {
        return text;
    }

    public void setText(TextMessage text) {
        this.text = text;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        KfTextMessage that = (KfTextMessage) o;
        return Objects.equals(text, that.text);
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), text);
    }

    @Override
    public String toString() {
        return "KfTextMessage{" +
                "text=" + text +
                '}';
    }

    public KfTextMessage(TextMessage text) {
        this.text = text;
    }

    public KfTextMessage() {
    }
}
